<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>系统首页</title>

	<script type="text/javascript">
		$(document).ready(function() {
			let _mainFrame = window.top.document.getElementById('mainFrame');
			const bodyHeight = $(_mainFrame).height();
			const headerHeight = $('#notice-title').outerHeight(true) || 0;
			$('#notice-content').height(bodyHeight - headerHeight - 62);
		});
	</script>
</head>
<body>
	<div class="content">
		<div class="row">

			<div class="col-sm-7">
				<div class="card m-0 border-left-3 border-left-primary">
					<div id="notice-title" class="card-body p-2 text-primary">
						<h6 class="font-weight-semibold mt-2"><i class="mi-fiber-new mi-2x mr-2"></i>通知公告</h6>
					</div>
					<div id="notice-content" class="card-body overflow-auto">
						<c:forEach items="${stm:getNoticeList(10)}" var="sysNotice" varStatus="s">
							<c:if test="${sysNotice.sysFile.fileExt eq 'pdf'}">
								<a href="#" class="dropdown-item" onclick="popupLayerFull(this,'文件预览')"
								   data-url="${ctxAdmin}/sys/sysFile/preview?id=${sysNotice.sysFile.id}">
									<i class="mi-filter-${s.index+1}"></i>
									<span>${sysNotice.name}</span>
									<i onclick="location.href='${ctxAdmin}/sys/sysFile/download?id=${sysNotice.sysFile.id}'"
									   class="mi-get-app ml-2 text-primary"></i>
									<span class="ml-auto"><fmt:formatDate value="${sysNotice.showDate}" pattern="yyyy/MM/dd"/></span>
								</a>
							</c:if>
							<c:if test="${sysNotice.sysFile.fileExt ne 'pdf'}">
								<a href="#" class="dropdown-item">
									<i class="mi-filter-${s.index+1}"></i>
									<span>${sysNotice.name}</span>
									<i onclick="location.href='${ctxAdmin}/sys/sysFile/download?id=${sysNotice.sysFile.id}'"
									   class="mi-get-app ml-2 text-primary"></i>
									<span class="ml-auto"><fmt:formatDate value="${sysNotice.showDate}" pattern="yyyy/MM/dd"/></span>
								</a>
							</c:if>
						</c:forEach>
					</div>
				</div>
			</div>
		</div>

		<%--<div class="row">

			<div class="col-sm-6">
				<div class="card border-left-3 border-left-primary">
					<div class="card-body">
						<div class="mb-3">
							<h6 class="font-weight-semibold mt-2"><i class="icon-folder6 mr-2"></i>附件下载</h6>
							<div class="dropdown-divider mb-2"></div>
							<a href="#" class="dropdown-item">
								<i class="icon-file-word"></i> 测试附件下载数据 <span class="ml-auto mi-get-app"></span>
							</a>
							<a href="#" class="dropdown-item"><i class="icon-file-pdf"></i> 测试附件下载数据，测试附件下载数据<span class="ml-auto mi-get-app"></span></a>
							<a href="#" class="dropdown-item"><i class="icon-file-excel"></i> 测试附件下载数据，测试附件下载数据<span class="ml-auto mi-get-app"></span></a>
							<a href="#" class="dropdown-item"><i class="icon-file-text2"></i> 测试附件下载数据，测试附件下载数据，测试附件下载数据<span class="ml-auto mi-get-app"></span></a>
							<a href="#" class="dropdown-item"><i class="icon-arrow-right22"></i>显示更多</a>
						</div>
					</div>
				</div>
			</div>
		</div>--%>
	</div>
</body>
</html>